﻿
using Xacml.Core;
using System;
using System.Xml;

namespace Xacml.Core.Policy
{
  public class PolicySetCombinerParameterElement : CombinerParameterElement
  {
    private Uri _policySetIdRef;

    public Uri PolicySetIdRef
    {
      get
      {
        return this._policySetIdRef;
      }
    }

    public PolicySetCombinerParameterElement(string parameterName, AttributeValueElement attributeValue, Uri policySetIdRef, XacmlVersion version)
      : base(parameterName, attributeValue, version)
    {
      this._policySetIdRef = policySetIdRef;
    }

    public PolicySetCombinerParameterElement(XmlReader reader, XacmlVersion version)
      : base(reader, "PolicySetCombinerParameterElement", version)
    {
    }

    protected override void AttributeFound(XmlReader reader)
    {
      if (!(reader.LocalName == "PolicySetIdRef"))
        return;
      this._policySetIdRef = new Uri(reader.GetAttribute("PolicySetIdRef"));
    }
  }
}
